#!/usr/lib/python
# author: koopa516@gmail.com
# python 3.4.1

# Multiples of 3 and 5: Euler 1

### CONFIG
multiples = []
x = 0 # Starting number
###

### ALGORITHM
while True:
    if (x >= 1000): break # Stop counting after 1000
    elif ((x / 3) % 1 == 0): multiples.append(x); # Multiples of 3 go to "multiples" list
    elif ((x / 5) % 1 == 0):
        if (x in multiples): pass; # Check if "x" exists in "multiples"
        else: multiples.append(x) # Multiples of 5 go to "multiples" list
    x += 1
###

### OUTPUT
print(sum(multiples)) # Print answer
###
